home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Singles Flirt Up Your Life! (German)
/
Singles Flirt Up Your Life.iso
/
data1.cab
/
Statemachine
/
questTrouble1a.lua
< prev
next >
Wrap
Text File
|
2004-01-29
|
2KB
|
68 lines
beginStateMachine()
-- called when questor builds up all known questScripts
onEnter(function(msg)
print("questTrouble1 entered");
setState("initial");
end )
-- on game over: relationship conditions get reset to 0 and all quests are reset to initial
onMsg("questreset", function(msg)
setState("initial");
end )
---------------------------------------------------------------------------------------------------------------------------------------
state("initial")
onMsg("checkCondition", function(msg)
local mike = getParent().getParent().getCharacter(MIKE);
local elaine = getParent().getParent().getCharacter(ELAINE);
if elaine.getRelationshipCondition(MIKE, REL_TROUBLE) >= 1
then
elaine.queueCommand("pm_talkCutscene", "talkCutscene", mike, "questTrouble1a");
setState("talktome");
else
if mike.getRelationshipCondition(ELAINE, REL_TROUBLE) >= 1
then
mike.queueCommand("pm_talkCutscene", "talkCutscene", elaine, "questTrouble1a");
setState("talktome");
end
end
end )
state("talktome")
-- assoon as arrived - start dialog
onMsg("talking", function(msg)
if ( msg.data == "questTrouble1a" ) then
if msg.sender == getParent().getParent().getCharacter(ELAINE).getUniqueID() then
popupConversation("dialogTrouble1a");
else
popupConversation("dialogTrouble1b");
end
setState("donetalktome");
end
end )
state("donetalktome");
onMsg("yes", function(msg)
getParent().getParent().getCharacter(MIKE).cancelCurrentActivity();
getParent().getParent().getCharacter(ELAINE).cancelCurrentActivity();
setState("done");
end )
---------------------------------------------------------------------------------------------------------------------------------------
state("done")
-- sackgasse hier
endStateMachine()